<div class="row-fluid">
	<div class="span2"></div>
	<div class="span8">
		<form action="<?php echo $this->webroot;?>upload/save" method='post' enctype='multipart/form-data'>
		    <p class="lead text-center demo-panel-title"><?php echo __("Upload form"); ?></p>
			<div class="attach-form">
			    <div class="control-group">
				    <input required  type="text" class="" value="<?php echo $attachTipo ?>" placeholder="<?php echo __('Attach tipo')?>"  name="attachTipo" >
					<input type='file' name='attach' />
				    <input type="text" class="" value="" placeholder="<?php echo __('Url')?>"  name="url" >
			        <button type="submit" class="btn btn-default btn-block" ><?php echo __("UPLOAD"); ?></button>
			    </div>
			</div>
		</form>
	</div>
	<div class="span2"></div>
</div>
<div class="row-fluid">
	<div class="span2"></div>
	<div class="span8">
	    <p class="lead text-center demo-panel-title"><?php echo __("Attaches"); ?></p>
        <?php if (count($attaches)>0) { ?>
            <table class="table table-hover prestazioni">
	              <thead>
	                <tr>
	                  <th></th>
	                  <th><?php echo  __("id"); ?></th>
	                  <th><?php echo __("filename"); ?></th>
	                  <th><?php echo __("path dinamico"); ?></th>
	                  <th><?php echo __("attach tipo"); ?></th>
	                  <th><?php echo __("dimensione"); ?></th>
	                  <th><?php echo __("tipo file"); ?></th>
	                  <th><?php echo __("utente inserimento"); ?></th>
	                  <th><?php echo __("data inserimento"); ?></th>
	                </tr>
	              </thead>
	              <tbody>
	                  <? foreach ($attaches as $key => $attach) { ?>
		              	<tr>
		                  <td><?php echo $this->Acl->link("<i class='icon-trash'></i>",array("controller" => "Upload", "action" => "delete", $attach["Attach"]["id"]), array('data-confirm'=>'true','class'=>'btn','escape'=>false));  ?> </td>
		                  <td><?php echo $attach["Attach"]["id"]; ?></td>
		                  <td><?php echo $attach["Attach"]["file_name"]; ?></td>
		                  <td><?php echo $attach["Attach"]["path_dinamico"]; ?></td>
		                  <td><?php echo $attach["Attach"]["attach_tipo"]; ?></td>
		                  <td><?php echo $attach["Attach"]["dimensione"]; ?></td>
		                  <td><?php echo $attach["Attach"]["tipo"]; ?></td>
		                  <td><?php echo $attach["Attach"]["ut_ins"]; ?></td>
		                  <td><?php echo $attach["Attach"]["dt_ins"]; ?></td>
		                </tr>
    					<?php } ?>
	              </tbody>
	        </table>  
        <?php }else{ ?>
                <label class="text-center"><i class="icon-frown"></i> Non ci sono attach.</label>       
        <?php }?>
	</div>
	<div class="span2"></div>
</div>